<?php
namespace app\agent\controller;
use think\Controller;
use think\Request;
use think\Session;

class Base extends Controller
{
    //
    public function __construct(Request $request = null)
    {
        parent::__construct($request);
        if(Session::get('agents')==null){
            echo "<script>alert('请先登录');window.location.href='".url('agent/Login/index')."'</script>";die;
        }

    }
}
